import http from '@/utils/https'
// 加入购物车 /member/cart
export const postMemberCart = (data) => {
  return http({
    url: '/member/cart',
    method: 'post',
    data
  })
}

// 购物车列表
export const getMemberCart = () => {
  return http({
    url: '/member/cart'
  })
}
// 修改购物车商品 /member/cart/{id}
export const putMemberCart = (id, data) => {
  return http({
    url: `/member/cart/${id}`,
    method: 'put',
    data
  })
}
// 购物车全选/取消全选 /member/cart/selected
export const putMemberCartSelected = (data) => {
  return http({
    url: '/member/cart/selected',
    method: 'put',
    data
  })
}

// 删除/清空购物车商品 /member/cart
export const deleteMemberCart = (data) => {
  return http({
    url: '/member/cart',
    method: 'delete',
    data
  })
}
